{include file='public:header-css'/}
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        {include file='public:left-menu'/}
        <!--End 左侧导航-->
        <!--头部信息-->
        {include file='public:nav-header' title="店铺管理" subTitle="提现记录"/}
        <!--End 头部信息-->

        <!--页面主要内容-->
        <main class="lyear-layout-content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="hint">
                                <div class="hint-info">
                                    <h5><i class="mdi mdi-help-circle-outline"></i>操作提示</h5>
                                    <p>商家提现记录列表</p>
                                </div>
                            </div>
                            <div class="card-toolbar">
                                <div class="toolbar-btn-action">
                                    <a class="btn btn-label btn-danger" href="{:url('Store/withdraw')}"><label><i
                                            class="mdi mdi-wallet"></i></label> 申请提现</a>
                                    <a class="btn btn-label btn-theme" onclick="submit1(2)" href="javascript:;"><label><i
                                            class="mdi mdi-buffer"></i></label> 导出数据</a>
                                </div>
                                <div class="card-toolbar-center">
                                    <a href="" class="table-btn btn-dark"><i class="mdi mdi-replay"></i></a>
                                    <button class="table-btn btn-theme">共{$list->total()}条记录
                                        当前第{$list->currentPage()}页
                                    </button>
                                </div>
                                <form class="table-form" method="post" action="">
                                    <input type="hidden" name="ids">
                                    <div class="table-form-group">
                                        <input data-type="time" readonly id="start_time" name="start_time" type="text"
                                               value="{$start_time}">
                                        <button class="btn btn-default" type="button">开始时间</button>
                                    </div>
                                    <div class="table-form-group">
                                        <input data-type="time" name="end_time" id="end_time" type="text"
                                               value="{$end_time}" readonly>
                                        <button class="btn btn-default" type="button">结束时间</button>
                                    </div>
                                    <div class="table-form-group">
                                        <select name="status" class="input-group-select"  style="margin-right: -1px">
                                            <option value="">状态</option>
                                            <option value="-1" {if $Request.param.status=='-1'}selected{/if}>待审核</option>
                                            <option value="1" {if $Request.param.status=='1'}selected{/if}>审核通过</option>
                                            <option value="2" {if $Request.param.status=='2'}selected{/if}>审核失败</option>
                                        </select>
                                    </div>
                                    <div class="table-form-group">
                                        <select name="tx_type" class="input-group-select" style="margin-right: -1px">
                                            <option value="">提现方式</option>
                                            <option value="1" {if $Request.param.tx_type=='1'}selected{/if}>微信</option>
                                            <option value="2" {if $Request.param.tx_type=='2'}selected{/if}>支付宝</option>
                                        </select>
                                        <button class="btn btn-default" onclick="submit1(1)" type="button">搜索</button>
                                    </div>
                                </form>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive">
                                    <table class="table table-bordered table-hover">
                                        <thead>
                                        <tr>
                                            <th>
                                                <label class="table-checkbox">
                                                    <input type="checkbox" id="check-all"><span></span>
                                                </label>
                                            </th>
                                            <th>编号</th>
                                            <th>申请金额</th>
                                            <th>手续费</th>
                                            <th>实际到账</th>
                                            <th>提现方式</th>
                                            <th>提现信息</th>
                                            <th>状态</th>
                                            <th>申请时间</th>
                                            <th>审核时间</th>
                                            <th>拒绝时间</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {if $list->isEmpty()}
                                        <tr>
                                            <td class="no-data" colspan="50">
                                                <i class="mdi mdi-alert-decagram"></i>没有符合条件的记录
                                            </td>
                                        </tr>
                                        {else/}
                                        {volist name="$list" id="vo"}
                                        <tr>
                                            <td>
                                                <label class="table-checkbox">
                                                    <input type="checkbox" class="checkbox"
                                                           value="{$vo[$vo.pk]}"><span></span>
                                                </label>
                                            </td>
                                            <td>{$vo[$vo.pk]}</td>
                                            <td>{$vo.money}</td>
                                            <td>{$vo.taxfee}</td>
                                            <td class="text-red">{$vo.true_money}</td>
                                            <td>{$vo.tx_type_text}</td>
                                            <td>{$vo.zhanghu}</td>
                                            <td>{$vo.status_text}</td>
                                            <td>{$vo.create_time}</td>
                                            <td>{$vo.check_time}</td>
                                            <td>{$vo.refuse_time}</td>
                                        </tr>
                                        {/volist}
                                        {/if}
                                        </tbody>
                                    </table>
                                </div>
                                <!--分页-->
                                <div class="page">
                                    {$page|raw}
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>
<!--日期选择插件-->
<script src="__STATIC__/plugin/laydate/laydate/laydate.js"></script>
<script type="text/javascript">
    $(function () {
        $('#start_time').layDate();
        $('#end_time').layDate();
    });
    $(document).keyup(function(event){
        if(event.keyCode ==13){
            submit(1);
        }
    });
    function submit1(type) {
        if (type==1){
            $('[name=ids]').val('');
            var url="{:url('Store/withdraw_list')}";
        }else {
            var checkbox = $('.checkbox:checked');
            var ids = [];
            $.each(checkbox, function (index, item) {
                ids.push(item.value)
            });
            $('[name=ids]').val(ids);
            var url="{:url('Store/export_with')}";
        }
        $('.table-form').attr('action',url).submit();
    }
</script>
</body>
</html>
